import request from '@/utils/request'

// 销售订单
export function queryTSalOrderList(data) {
  return request({
    url: '/tSaleOrder/querySplitOrderList',
    method: 'post',
    data
  })
}
// 新增销售订单 -- 获取数据
export function queryFxxchange(data) {
  return request({
    url: '/tSaleOrder/queryFxxchange',
    method: 'post',
    data
  })
}
// 新增销售订单 -- 监听组织
export function queryOrgDetail(data) {
  return request({
    url: '/tOrgOrganizations/queryOrgDetail',
    method: 'post',
    data
  })
}
// 销售订单详情
export function queryTSalOrderNtry(params) {
  return request({
    url: '/tSaleOrder/queryTSalOrderNtry',
    method: 'get',
    params
  })
}
// 更改订单类型
export function updateSalType(data) {
  return request({
    url: '/tSaleOrder/updateSalType',
    method: 'put',
    data
  })
}
// 新增销售订单
export function insertSalOrder(data) {
  return request({
    url: '/tSaleOrder/insertSaleOrder',
    method: 'post',
    data
  })
}
// 查询单据类型
export function queryTBasBilltype(data) {
  return request({
    url: '/tBaseBilltype/queryBillType',
    method: 'post',
    data
  })
}
// 查询结算币别- 分页
export function queryTBdCurrency(data) {
  return request({
    url: '/tBaseCurrency/queryBaseCurrencyList',
    method: 'post',
    data
  })
}
// 查询客户列表-分页
export function queryTBdCustomerList(data) {
  return request({
    url: '/tBdCustomer/queryTBdCustomerList',
    method: 'post',
    data
  })
}
// 查询价目列表-分页
export function queryCustomerSalPriceList(data) {
  return request({
    url: '/tSalPricelist/querySalPriceHeaderList',
    method: 'post',
    data
  })
}
// 查询销售订单销售员 - 分页
export function querySalesperson(data) {
  return request({
    url: '/common/queryStaffUserList',
    method: 'post',
    data
  })
}
// 查询销售订单本位币和汇率类型
export function querySalOrderFxxchange(data) {
  return request({
    url: '/tSalOrder/queryFxxchange',
    method: 'post',
    data
  })
}
// 查询销售订单税率
export function querySalerRate(data) {
  return request({
    url: '/tBdRate/querySalerRate',
    method: 'post',
    data
  })
}
// 查询销售订单税率(子怡)
export function queryRate(data) {
  return request({
    url: '/tBaseCurrency/queryRate',
    method: 'post',
    data
  })
}
// 查询物料列表(销售订单)
export function querySalMaterialList(data) {
  return request({
    url: '/tSalPricelistentry/querySalMaterialList',
    method: 'post',
    data
  })
}
// 查询物料列表(销售价目)
export function queryMaterialList(data) {
  return request({
    url: '/tBdMaterial/queryTBdMaterialList',
    method: 'post',
    data
  })
}
// 查询还未处理的销售订单列表-分页
export function queryUntreateSalorderList(data) {
  return request({
    url: '/tSalOrder/queryUntreateSalorderList',
    method: 'post',
    data
  })
}
// 审核中的销售订单列表-分页
export function queryReviewSalorderList(data) {
  return request({
    url: '/tSalOrder/queryReviewSalorderList',
    method: 'post',
    data
  })
}
// 审核未通过的销售订单-分页
export function queryFailSalorderList(data) {
  return request({
    url: '/tSalOrder/queryFailSalorderList',
    method: 'post',
    data
  })
}
// 未处理的销售订单进行审核
export function reviewSalorder(data) {
  return request({
    url: '/tSaleOrder/reviewSaleOrder',
    method: 'post',
    data
  })
}
// 未处理的审核不通过
export function notReviewSalorder(data) {
  return request({
    url: '/tSaleOrder/notreviewSaleOrder',
    method: 'post',
    data
  })
}
// 提交
export function submitSaleOrder(data) {
  return request({
    url: '/tSaleOrder/submitSaleOrder',
    method: 'post',
    data
  })
}
// 反提交
export function notsubmitSaleOrder(data) {
  return request({
    url: '/tSaleOrder/notsubmitSaleOrder',
    method: 'post',
    data
  })
}
// 重新审核
export function againReviewSalorder(data) {
  return request({
    url: '/tSalOrder/againReviewSalorder',
    method: 'put',
    data
  })
}
// 反作废
export function unCancelSaleOrder(data) {
  return request({
    url: '/tSaleOrder/unCancelSaleOrder',
    method: 'post',
    data
  })
}
// 作废
export function cancelSaleOrder(data) {
  return request({
    url: '/tSaleOrder/cancelSaleOrder',
    method: 'post',
    data
  })
}
// 修改销售订单
export function updateSalOrder(data) {
  return request({
    url: '/tSaleOrder/updateSaleOrder',
    method: 'post',
    data
  })
}
// 销售申请单反提交
export function notsubmitSaleApply(data) {
  return request({
    url: '/tSalOrderapply/notsubmitSaleApply',
    method: 'put',
    data
  })
}
// 销售申请单提交
export function submitSaleApply(data) {
  return request({
    url: '/tSalOrderapply/submitSaleApply',
    method: 'put',
    data
  })
}
// 销售申请单反审核
export function notreviewSaleApply(data) {
  return request({
    url: '/tSalOrderapply/notreviewSaleApply',
    method: 'put',
    data
  })
}
// 销售申请单审核
export function reviewSaleApply(data) {
  return request({
    url: '/tSalOrderapply/reviewSaleApply',
    method: 'put',
    data
  })
}
// 销售申请单删除
export function delSaleApply(data) {
  return request({
    url: '/tSalOrderapply/delSaleApply',
    method: 'put',
    data
  })
}
// 销售申请单客户状态修改
export function undoSalApply(data) {
  return request({
    url: '/tSalOrderapply/undoSalApply',
    method: 'put',
    data
  })
}
// 根据客户查询销售价目名称
export function querySalPriceCustomer(data) {
  return request({
    url: '/tSalPricelist/queryCustLatestPricelist',
    method: 'post',
    data
  })
}
// 查询销售订单日志、操作人
export function querySalOrderLog(data) {
  return request({
    url: '/TJxLog/queryLog',
    method: 'post',
    data
  })
}
// 获取销售价目表物料价格(单个)
export function querySalDownPrice(data) {
  return request({
    url: '/tSalPricelist/queryMaterialPrice',
    method: 'post',
    data
  })
}
// 获取销售价目表物料价格(批量)
export function queryMaterialsPrice(data) {
  return request({
    url: '/tSalPricelist/queryMaterialsPrice',
    method: 'post',
    data
  })
}
// 核对销售基准价(批量)
export function paddingSalDownPrice(data) {
  return request({
    url: '/tSalPricelist/paddingSalDownPrice',
    method: 'post',
    data
  })
}
// 查询销售订单明细列表 - 分页
export function queryTSalOrderDetailsList(data) {
  return request({
    url: '/tSaleOrder/queryTSalOrderDetailsList',
    method: 'post',
    data
  })
}
// 查询包装方式
export function queryBasAssList(params) {
  return request({
    url: '/tBasAssistantdataentry/queryBasAssList',
    method: 'get',
    params
  })
}
// 批量获取对应的销售基准价
export function querySalDownPriceList(data) {
  return request({
    url: '/tSalOrder/querySalDownPriceList',
    method: 'post',
    data
  })
}
// 更新发货期
export function updateSalDate(data) {
  return request({
    url: '/tSaleOrder/updateSalDate',
    method: 'put',
    data
  })
}
// 删除销售订单
export function deleteSalOrder(data) {
  return request({
    url: '/tSaleOrder/delSaleOrder',
    method: 'post',
    data
  })
}
// 删除销售申请订单
export function deleteSalApply(data) {
  return request({
    url: ' /tSalOrderapply/deleteSalApply',
    method: 'post',
    data
  })
}
// 查询物料库存盘点情况
export function queryPbdStock(data) {
  return request({
    url: '/tJcPbd/queryPdbStock',
    method: 'post',
    data
  })
}
// 查询数据视图
export function queryViewItem(data) {
  return request({
    url: '/tBaseDataDictionary/queryViewItem',
    method: 'post',
    data
  })
}
// 包装方式
export function queryTBdStockList(data) {
  return request({
    url: '/tBaseDataDictionary/queryDataDictionaryListById',
    method: 'post',
    data
  })
}
// 启用
export function ableSaleOrder(data) {
  return request({
    url: '/tSaleOrder/unCloseSaleOrder',
    method: 'post',
    data
  })
}
// 禁用
export function disableSaleOrder(data) {
  return request({
    url: '/tSaleOrder/closeSaleOrder',
    method: 'post',
    data
  })
}
// 销售申请列表
export function queryTApplyDetailsList(data) {
  return request({
    url: '/tSalOrderapply/queryTSalOrderDetailsList',
    method: 'post',
    data
  })
}
// 销售申请单详情
export function queryTSalOrderapplyNtry(params) {
  return request({
    url: '/tSalOrderapply/queryTSalOrderapplyNtry',
    method: 'get',
    params
  })
}
// 销售申请单修改
export function updateSalOrderapply(data) {
  return request({
    url: '/tSalOrderapply/updateSalOrderapply',
    method: 'post',
    data
  })
}
// 销售订单下推采购
export function pushSalorder(data) {
  return request({
    url: '/tPurPoorder/pushSalorder',
    method: 'post',
    data
  })
}
// 通过客户物料编码查询物料编码
export function queryCustmatmappingList(data) {
  return request({
    url: '/Custmatmapping/queryCustmatnumber',
    method: 'post',
    data
  })
}
// 上下查
export function queryDownList(data) {
  return request({
    url: '/tSxUpanddown/queryDownList',
    method: 'post',
    data
  })
}
// 更新生产日期
export function updatePrdDate(data) {
  return request({
    url: '/tSaleOrder/updatePrdDate',
    method: 'put',
    data
  })
}
// 更新生产日期
export function updatePrdAllDate(data) {
  return request({
    url: '/tSaleOrder/updatePrdAllDate',
    method: 'put',
    data
  })
}
// 整单材料明细
export function querySalDedailRawMaterial(data) {
  return request({
    url: '/tSaleOrder/querySalDedailRawMaterial',
    method: 'post',
    data
  })
}
// 销售订单明细行审核
export function audit(data) {
  return request({
    url: '/tSaleOrder/saleOrderEntry/audit',
    method: 'post',
    data
  })
}
// 销售订单明细行反审核
export function reAudit(data) {
  return request({
    url: '/tSaleOrder/saleOrderEntry/reAudit',
    method: 'post',
    data
  })
}
// 销售订单明细行删除
export function deletes(data) {
  return request({
    url: '/tSaleOrder/saleOrderEntry/delete',
    method: 'post',
    data
  })
}
// 销售订单明细修改
export function update(data) {
  return request({
    url: '/tSaleOrder/saleOrderEntry/update',
    method: 'post',
    data
  })
}
// 销售排单列表
export function queryTSalOrderScheduling(data) {
  return request({
    url: '/tSaleOrder/queryTSalOrderScheduling',
    method: 'post',
    data
  })
}
// 销售排单列表-排单确认
export function SchedulingConfirm(data) {
  return request({
    url: '/tSaleOrder/SchedulingConfirm',
    method: 'post',
    data
  })
}
// 销售排单列表-排单取消
export function SchedulingCancel(data) {
  return request({
    url: '/tSaleOrder/SchedulingCancel',
    method: 'post',
    data
  })
}
